//package com.legendshop.openportal.sdk.client.http.analyzer;
//
//import cn.hutool.http.HttpResponse;
//import com.legendshop.openportal.sdk.client.http.HttpResponseAnalyzer;
//import com.legendshop.openportal.sdk.client.http.HttpResponseAnalyzerContext;
//import com.legendshop.openportal.sdk.model.BaseResponse;
//import com.legendshop.openportal.sdk.model.OpenResult;
//import com.legendshop.openportal.sdk.model.response.JsonMapResponse;
//import com.legendshop.openportal.sdk.utils.ConvertUtil;
//
//import java.lang.reflect.Type;
//
///**
// * @Description: 将MAP传入到返回对象中的处理器
// * @Author lwj
// * @data 2024/6/19
// **/
//public class JsonResultMapResponseAnalyzer implements HttpResponseAnalyzer {
//
//    private static final JsonResultMapResponseAnalyzer INSTANCE = new JsonResultMapResponseAnalyzer();
//
//    private JsonResultMapResponseAnalyzer() {
//    }
//
//    public static JsonResultMapResponseAnalyzer getInstance() {
//        return INSTANCE;
//    }
//
//    @Override
//    public <T> OpenResult<T> analyze(HttpResponse httpResponse, Type responseClass) {
//        Class<JsonMapResponse> jsonMapResponseClass = JsonMapResponse.class;
//        // 判断是否是jsonMapResponseClass
//        if (jsonMapResponseClass.getClass().equals(responseClass)) {
//            return ConvertUtil.convert2OpenMapResult(HttpResponseAnalyzerContext.get(), responseClass);
//        } else {
//            return null;
//        }
//    }
//}
